package com.wxy.ej.flow.modules.taskflow.facade;

import com.alibaba.fastjson.JSONObject;
import com.rt.easyjava.common.base.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId = "collectionDataApi", name = "scm-epcodeless-nosql")
public interface CollectionDataApi {

    @PostMapping(value="/nosql/innerService/collectionData/saveJson")
    Result saveJson(@RequestBody JSONObject jsonObject, @RequestParam String collectionName);

    @PostMapping(value="/nosql/innerService/collectionData/saveJsonUnique")
    Result saveJsonUnique(@RequestBody JSONObject jsonObject, @RequestParam String collectionName, @RequestParam String key);

    @PostMapping(value="/nosql/innerService/collectionData/query")
    Result query(@RequestBody JSONObject queryJsonObject, @RequestParam String collectionName);

    @PostMapping(value="/nosql/innerService/collectionData/page")
    Result page(@RequestBody JSONObject queryJsonObject, @RequestParam String collectionName);

}
